Skip to content

[EuiTable/EuiBasicTable/EuiInMemoryTable] Warn when not recommended cell/column width units are used#9540

Merged
tkajtoch merged 3 commits intoelastic:mainfrom
tkajtoch:feat/column-width-warnings
Mar 30, 2026
Merged

[EuiTable/EuiBasicTable/EuiInMemoryTable] Warn when not recommended cell/column width units are used#9540
tkajtoch merged 3 commits intoelastic:mainfrom
tkajtoch:feat/column-width-warnings

Conversation

@tkajtoch
Copy link
Copy Markdown
Member

@tkajtoch tkajtoch commented Mar 30, 2026

Summary

Resolves #9444

This PR adds a console warning when non-recommended width units are used (%, vw, cqi, cqw). This

API Changes

No API changes

Screenshots

Screenshot 2026-03-30 at 12 13 09

Deprecation notice / migration guide

Adjust all width, minWidth and maxWidth prop values on <EuiTableFooterCell>, <EuiTableHeaderCell>, <EuiTableHeaderCellCheckbox> as well as the columns configuration on <EuiBasicTable> and <EuiInMemoryTable> to not use any viewport-relative length units. We recommend using the px unit for static elements like icons or plots and em for everything else.

Impact Assessment

  • 🔴 Breaking changes — What will break? How many usages in Kibana/Cloud UI are impacted?
  • 💅 Visual changes — May impact style overrides; could require visual testing. Explain and estimate impact.
  • 🧪 Test impact — May break functional or snapshot tests (e.g., HTML structure, class names, default values).
  • 🔧 Hard to integrate — If integration is complex, stage commits in Kibana/Cloud UI branches for cherry-picking and link to them below.

Impact level: 🟢 None

Release Readiness

  • Documentation: {link to docs page(s)} Will be updated in [Tables sweep] Add tabular content guidelines #9527 instead
  • Figma: {link to Figma or issue}
  • Migration guide: {steps or link, for breaking/visual changes or deprecations}
  • Adoption plan (new features): {link to issue/doc or outline who will integrate this and where}

QA instructions for reviewer

  1. Checkout this branch and run Storybook
  2. Go to the following Stories, update width, minWidth or maxWidth props to a value including % and confirm the warning message appears in console

Checklist before marking Ready for Review

Reviewer checklist

  • Approved Impact Assessment — Acceptable to merge given the consumer impact.
  • Approved Release Readiness — Docs, Figma, and migration info are sufficient to ship.

@tkajtoch tkajtoch self-assigned this Mar 30, 2026
@tkajtoch tkajtoch marked this pull request as ready for review March 30, 2026 10:21
@tkajtoch tkajtoch requested a review from a team as a code owner March 30, 2026 10:21
@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @tkajtoch

@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

cc @tkajtoch

@acstll acstll self-requested a review March 30, 2026 12:15
Copy link
Copy Markdown
Contributor

@acstll acstll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Tested locally in Storybook, everything working as expected. Also from the code side, looking good 👍

Comment on lines +33 to +35
export const WARNING_MESSAGE_NOT_RECOMMENDED_UNIT =
'Detected not recommended unit (%, vw, cqw, cqi) in cell width settings. Adjust the `width`, `minWidth` and `maxWidth` values to use absolute length units like `em` for text cells or `px` for static elements like icons or plots.';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(out of scope) it'd be nice for consumers to have a reference in the message to where it's coming from, something like "EuiTable: Detected not recommended unit…", otherwise might be a bit mysterious (i'm guessing it's not straightforward to do since the message applies to many different components)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that was exactly my thinking on this one, and I decided to leave it as-is... We should probably have a method to inform users of deprecations and other similar warnings better

@tkajtoch tkajtoch merged commit fcfbc9e into elastic:main Mar 30, 2026
5 checks passed
weronikaolejniczak pushed a commit to weronikaolejniczak/eui that referenced this pull request Apr 7, 2026
weronikaolejniczak pushed a commit to weronikaolejniczak/eui that referenced this pull request Apr 7, 2026
mgadewoll added a commit to elastic/kibana that referenced this pull request Apr 13, 2026
## Dependency updates

- `@elastic/eui` - v114.0.0 ⏩ v114.1.0
- `@elastic/eslint-plugin-eui` - v2.11.0 ⏩ v2.11.1

---

## Package updates

### @elastic/eui
[`v114.1.0`](https://github.com/elastic/eui/releases/v114.1.0)

- Added an optional `tooltipProps` prop to `EuiMarkdownEditorHelpButton`
([#9546](elastic/eui#9546))
- Added a warning when non-recommended units are used in `width`,
`minWidth` or `maxWidth` props on `<EuiTableFooterCell>`,
`<EuiTableHeaderCell>`, `<EuiTableHeaderCellCheckbox>` as well as the
`columns` configuration on `<EuiBasicTable>` and `<EuiInMemoryTable>`
([#9540](elastic/eui#9540))
- Added `transitionBottomIn` and `transitionBottomOut` icons to
`EuiIcon` ([#9528](elastic/eui#9528))

**Bug fixes**

- Fixed `EuiFlyoutManager` animation flickering when switching between
flyout sessions by removing intermediate transition stages
(backgrounding, returning, closing) and limiting opening animations to
the initial flyout and first child only
([#9514](elastic/eui#9514))
- Fixed rendering of `EuiTableHeaderMobile` when
`responsiveBreakpoint=false` prop is set
([#9531](elastic/eui#9531))

### @elastic/eslint-plugin-eui v2.11.1

**Bug fixes**

- Fixed `no-css-color` ESLint rule crash when analyzing functions that
return `undefined` or non-object values
([#9368](elastic/eui#9368))

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
michel-laterman pushed a commit to michel-laterman/kibana that referenced this pull request Apr 13, 2026
## Dependency updates

- `@elastic/eui` - v114.0.0 ⏩ v114.1.0
- `@elastic/eslint-plugin-eui` - v2.11.0 ⏩ v2.11.1

---

## Package updates

### @elastic/eui
[`v114.1.0`](https://github.com/elastic/eui/releases/v114.1.0)

- Added an optional `tooltipProps` prop to `EuiMarkdownEditorHelpButton`
([elastic#9546](elastic/eui#9546))
- Added a warning when non-recommended units are used in `width`,
`minWidth` or `maxWidth` props on `<EuiTableFooterCell>`,
`<EuiTableHeaderCell>`, `<EuiTableHeaderCellCheckbox>` as well as the
`columns` configuration on `<EuiBasicTable>` and `<EuiInMemoryTable>`
([elastic#9540](elastic/eui#9540))
- Added `transitionBottomIn` and `transitionBottomOut` icons to
`EuiIcon` ([elastic#9528](elastic/eui#9528))

**Bug fixes**

- Fixed `EuiFlyoutManager` animation flickering when switching between
flyout sessions by removing intermediate transition stages
(backgrounding, returning, closing) and limiting opening animations to
the initial flyout and first child only
([elastic#9514](elastic/eui#9514))
- Fixed rendering of `EuiTableHeaderMobile` when
`responsiveBreakpoint=false` prop is set
([elastic#9531](elastic/eui#9531))

### @elastic/eslint-plugin-eui v2.11.1

**Bug fixes**

- Fixed `no-css-color` ESLint rule crash when analyzing functions that
return `undefined` or non-object values
([elastic#9368](elastic/eui#9368))

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
weronikaolejniczak pushed a commit to weronikaolejniczak/eui that referenced this pull request May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EuiBasicTable/EuiInMemoryTable] Warn developers when non-recommended column configurations are used

3 participants